
<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml" scroll="no">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
<!--Basic Styles-->
<link href="${ctx }framework/css/font.css" rel="stylesheet" />
<link href="${ctx }framework/miniui/themes/material/miniui.css"
	rel="stylesheet" />
<link href="${ctx }framework/css/app.min.1.css" rel="stylesheet"
	type="text/css" />
<link href="${ctx }framework/css/app.min.2.css" rel="stylesheet"
	type="text/css" />
<script src="${ctx }framework/main.js" type="text/javascript"></script>
<!-- <script src="https://cdn.bootcss.com/echarts/3.7.1/echarts.min.js"></script> -->
<script src="${ctx }eao/static/echarts.min.js" type="text/javascript"></script>
<style type="text/css">
html, body {
	margin: 0;
	padding: 0;
	border: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
}
</style>
<script>
	function doSearch() {
		var dc = {
				StartTime : mini.get("startTime").getFormValue(),
				EndTime : mini.get("endTime").getFormValue(),
				MProvince : mini.get("mProvince").getFormValue(),
				MCity : mini.get("mCity").getFormValue(),
				FullName : mini.get("FullName").getFormValue()
			};
		
		mini.get('dg1').load(dc);
		
		/* --------------柱状图----------------------- */
		var lineCount = [], lineAddTime = [];
		Server.sendRequest("visit.findAccountVisitV", dc, function(response) {
			if (response._STATUS == 1) {
				for (var i = 0; i < response.AddTime.length; i++) {
					lineCount.push(response.AddTime[i].count);
					lineAddTime.push(response.AddTime[i].date);
				}
				//柱状图
				var myChart = echarts.init(document.getElementById("provinceScale"));
				var option = {
					title : {
						text : '一级账户每日注册数量统计',
						x : 'center'
					},
					color : [ '#3398DB' ],
					tooltip : {
						trigger : 'axis',
						axisPointer : { 
							type : 'shadow' 
						}
					},
					grid : {
						left : '3%',
						right : '4%',
						bottom : '3%',
						containLabel : true
					},
					xAxis : [ {
						type : 'category',
						data : lineAddTime,
						axisTick : {
							alignWithLabel : true
						}
					} ],
					yAxis : [ {
						type : 'value'
					} ],
					series : [ {
						name : '一级账户每日注册数量统计',
						type : 'bar',
						barWidth : '60%',
						data : lineCount
					} ]
				};
				//折线图
				var lineMyChart = echarts.init(document.getElementById("lineChart"));
				lineOption = {
					tooltip : {
						trigger : 'axis',
						axisPointer : {
							type : 'cross',
							label : {
								backgroundColor : '#6a7985'
							}
						}
					},
					legend : {
						data : ['一级账户每日注册数量统计']
					},
					toolbox : {
						feature : {
							saveAsImage : {}
						}
					},
					grid : {
						left : '3%',
						right : '4%',
						bottom : '3%',
						containLabel : true
					},
					xAxis : [ {
						type : 'category',
						boundaryGap : false,
						data : lineAddTime
					} ],
					yAxis : [ {
						type : 'value'
					} ],
					series : [ {
						name : '一级账户每日注册数量统计',
						type : 'line',
						stack : '总量',
						data : lineCount
					} ]
				};

				lineMyChart.setOption(lineOption);
				myChart.setOption(option);
			} else {
				top.mini.warn(response.Message);
			}
		});
		/* ------------------------------------- */
	}
	$(function() {
		doSearch();//触发doSearch（）方法
	});
	document.onkeydown = function(event) {
		event = getEvent(event);
		if (event.keyCode == 13) {
			var ele = event.srcElement || event.target;
			if (ele.id == 'SearchName' || ele.id == 'Submitbutton') {
				doSearch();
			}
		}
	};

	var newQueryString = null;

	function onRowSelect(e) {
		newQueryString = "ID=" + e.row.ID;
		mini.get('mainTabs').tryReload(newQueryString);
	}

	function onTabsActiveChanged(e) {
		e.sender.tryReload(newQueryString, e.sender.getTab(e.index));
	}

	Page.onLoad(function() {
		mini.get('dg1').reload();
	});
	function company(){
		mini.open({
			width:800,
			height:600,
			title:'请选择一级机构账号',
			url:'${ctx}eao/dataanalyze/companyInfoList.jhtml',
			onOk : function(){
				}
		});
	}
</script>
</head>
<body class="body-list" style="background: #F9F9F9;">
	<div id="layout1" class="mini-layout" style="width: 100%; height: 100%;">
		<div title="north" region="north" showheader="false">
       		<div class="mini-toolbar">
				<div class="pull-left">
					<span style="padding-left: 20px"> 从<input
						class="mini-datepicker" maxDate="Script=new Date()" id="startTime"
						name="StartDate" valueType="string" allowinput="false"format="yyyy-MM-dd" />&nbsp; 
						至<input class="mini-datepicker"maxDate="Script=new Date()" id="endTime" name="EndDate"valueType="string" allowinput="false" format="yyyy-MM-dd" />
					</span> 
					<input class="mini-textbox" id="mProvince" type="text"emptyText="请输入省份" /> 
					<input class="mini-textbox" id="mCity"type="text" emptyText="请输入城市" />
					<input class="mini-textbox" id="FullName" type="text" emptyText="请输入机构账号或名称" width="200"/>  
					<!-- <a class="mini-button" iconCls="icon-user" href="javascript:company();">选择一级机构账号</a> -->
					<button
						class="btn btn-default waves-effect waves-button waves-float"
						onClick="doSearch()">
						<i class="iconfont icon-search"></i>
					</button>
				</div>
			</div>
    	</div>
		<div region="west" width="900" showheader="false">
			<div class="mini-fit">
				<div id="dg1" class="mini-datagrid z-depth-1"
					style="width: 100%; height: 100%;" method="visit.findAccountVisit"
					multiSelect="true" idField="id">
					<div property="columns">
						<div type="indexcolumn"></div>
						<div field="Mobile" width="12%">一级机构账号</div>
						<div field="FullName" width="12%">机构名称</div>
						<div field="Address" width="13%">地区</div>
						<div field="AddTime" dateFormat="yyyy-MM-dd hh:mm:ss" width="12%">创建时间</div>
					</div>
				</div>
			</div>
		</div>
		<div region="center">
			<div id="mainTabs" class="mini-tabs"
				style="width: 100%; height: 100%;" plain="false"
				onbeforeactivechanged="onTabsActiveChanged">
				<div title="柱状图" iconCls="icon-menu">
					<div class="echarts" id="provinceScale"
						style="height: 500px; width: 500px; margin: 0 auto;"
						method="visit.findAccountVisitV"></div>
				</div>
				<div title="折线图" iconCls="icon-database">
					<div class="echarts" id="lineChart"
						style="height: 500px; width: 500px; margin: 0 auto;"
						method="visit.findAccountVisitV"></div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>

<!-- Generated by Wisc cost:10ms ip:123.14.77.14 -->